Row

confirmed

802

Active Cases

639

recovered

141

death

22

Column

Map

Daily cumulative cases

Column

Town cases

COVID19 cases (Erie county)
town confirmed recovered deaths
Buffalo 333 NA NA
Amherst 130 NA NA
Cheektowaga 57 NA NA
Hamburg 46 NA NA
Tonawanda 46 NA NA
West Seneca 32 NA NA
Lancaster 24 NA NA
Clarence 22 NA NA
Orchard Park 21 NA NA
Aurora 14 NA NA
Grand Island 14 NA NA
Elma 14 NA NA
Alden 13 NA NA
Lackawanna 8 NA NA
Evans 6 NA NA
North Collins 4 NA NA
City of Tonawanda 4 NA NA
Newstead 2 NA NA
Wales 2 NA NA
Concord 2 NA NA
Boston 2 NA NA
Holland 2 NA NA
Brant 1 NA NA
Colden 1 NA NA
Eden 1 NA NA
Total 801 NA NA
Note:
Last updated: (updated 4/3/2020 7PM EST)
Data Source
Public Advisories
The data is only for educational and academic research purposes.

Daily counts

COVID19 Daily cases (Erie county)
date confirmed new active recovered deaths
21 2020-04-03 802 68 639 141 22
20 2020-04-02 734 131 614 101 19
19 2020-04-01 603 50 510 81 12
18 2020-03-31 553 90 481 62 10
17 2020-03-30 463 49 402 53 8
16 2020-03-29 414 34 375 32 7
15 2020-03-28 380 70 347 27 6
14 2020-03-27 310 89 277 27 6
13 2020-03-26 221 75 200 16 5
12 2020-03-25 146 25 139 5 2
11 2020-03-24 121 25 121 0 0
10 2020-03-23 96 32 96 0 0
9 2020-03-22 64 8 64 0 0
8 2020-03-21 56 9 56 0 0
7 2020-03-20 47 18 47 0 0
6 2020-03-19 29 2 29 0 0
5 2020-03-18 27 7 27 0 0
4 2020-03-17 20 13 20 0 0
3 2020-03-16 7 0 7 0 0
2 2020-03-15 7 4 7 0 0
1 2020-03-14 3 3 3 0 0
---
title: COVID19 in Erie county
date: "`r gsub('\\(updated |\\ EST)|/2020', '', attributes(counts)$update.time)`"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    navbar:
      - { icon: fa-github, href: "https://github.com/hubentu/COVID19Erie"}
      - { title: "Erie Case Map", href: "https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1"}
      - { title: "Global Map", href: "https://coronavirus.jhu.edu/map.html"}
    social: menu
    source_code: embed
    vertical_layout: scroll
---

```{r setup, include=FALSE, eval=FALSE}
library(flexdashboard)
library(fontawesome)
library(COVID19Erie)
pubExposed <- exposedPub()
```

```{r}
counts <- caseCounts()
Counts <- rbind(counts,
                c(town = "Total", colSums(counts[,-1])))
ycount <- historyCount$confirmed[historyCount$date == Sys.Date() - 1]
ncount <- attributes(counts)$total.confirmed - ycount
```

Row {data-width=400}
-----------------------------------------------------------------------

### confirmed {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.confirmed,
  caption = paste0("Total confirmed cases (+", ncount, ")"),
  icon = "fas fa-ambulance",
  color = "purple"
)
```

### Active Cases {.value-box}
```{r}
valueBox(
  value = attributes(counts)$active.cases,
  caption = "Active cases",
  icon = "fas fa-hospital-user",
  color = "#1f77b4"
)
```

### recovered {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.recovered,
  caption = "Total recovered cases",
  icon = "fas fa-head-side-mask",
  color = "forestgreen"
)
```

### death {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.deaths,
  caption = "Death cases",
  icon = "fas fa-heart-broken",
  color = "#474747"
)
```


Column {data-height=600}
-----------------------------------------------------------------------
    
### Map
    
```{r}
caseMap(counts, pubExposed, titlePos = NULL)
```

### Daily cumulative cases
```{r}
countPlot(historyCount)
```

Column {data-height=600}
----------------------------------------------------------------------

### Town cases

```{r}
library(knitr)
library(kableExtra)
kable(Counts,
      caption = "COVID19 cases (Erie county)") %>%
    kable_styling(full_width = TRUE) %>% 
    footnote(general = c(paste("Last updated:", attributes(counts)$update.time),
                         "[Data Source](https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1)",
                         "[Public Advisories](http://www2.erie.gov/health/index.php?q=public-advisories)",
                         "The data is only for educational and academic research purposes.")) %>%
scroll_box(height = "600px")
```

### Daily counts
```{r}
kable(historyCount[order(historyCount$date, decreasing = TRUE),],
      caption = "COVID19 Daily cases (Erie county)") %>%
    kable_styling(full_width = TRUE)%>%
    scroll_box(height = "600px")
```